package top.chenfu.security.controller;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther chenfu
 * @2019/10/29 12:49
 * @Desc
 */
@RestController
public class HelloController {

    @GetMapping("/hello")
    public Object hello() {
        return "hello";
    }

    @GetMapping("/system/hello")
    public Object sysHello() {
        return "hello system";
    }

    @GetMapping("/dba/hello")
    public Object dbaHello() {
        return "hello dba";
    }

    @GetMapping("/user/hello")
    public Object userHello() {
        return "hello user";
    }

    public static void main(String[] args) {
        BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
        String encode = encoder.encode("123");
        System.out.println(encode);
    }

}
